package thread.sisuo;

public class WuXuSuo {

    public void  transferMoney(Account fromAccount,Account toAccount,Account transferMoney) throws InterruptedException {
        synchronized (fromAccount){
            Thread.currentThread().sleep(2000);
            synchronized (toAccount){
               System.out.println("转账金额:"+transferMoney.getMoney());
            }
        }
    }

}
